-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zed: Default app data location #4758
Conversation
db0eb5d
to
e4103dd
Compare
I was reviewing the paths proposed in this PR relative to some of the research I'd done at the request of the team when writing up #3956. I'll start by saying that I imagine any set of paths could probably be workable. However, to the degree we want to use this opportunity to be in line with prevailing conventions, we might want to think about some adjustments. Here my thoughts on each platform. LinuxThe changes in this PR show the Zed tools now leveraging
macOSWe discussed this one as a team. At first I was in favor of the way this PR would currently have Zed using a directory
These two things together make a compelling case for leveraging the XDG variables and fallback paths even on macOS. WindowsA comment in this PR mentions checking both An example of these paths from my personal Windows 10 system are that my My take-away is that we could probably rationalize either option. The advantage of putting the Zed lake below "Roaming" (so, leverage FWIW, per the Zui docs, Zui happens to currently leverage |
9474112
to
ff88fe9
Compare
537e57e
to
bd0668f
Compare
e6afe28
to
98e2802
Compare
@mattnibs: I'd remembered you indicating this branch was maybe finished, so I just did a retest of the branch at e6afe28 and it's still not making sense to me. For instance If I don't have
And even if I set |
@philrz I marked it finished but it is not, I'm still finding bugs in it. |
2d0db17
to
b0e2d08
Compare
@philrz et al this pr is now ready for review. |
This comment was marked as resolved.
This comment was marked as resolved.
488ca20
to
c6f9a57
Compare
If no lake location is specified, zed will use a per-os default location. Also if the default location is used, zed will first check if there's a service on 9867 and opt to connect to that instead of operating locally.
c6f9a57
to
3db2df4
Compare
cli/lakeflags/flags.go
Outdated
func portInUse(port string) bool { | ||
ln, err := net.Listen("tcp", port) | ||
if err != nil { | ||
return true | ||
} | ||
ln.Close() | ||
return false | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to have a test for this but this test would be need to be restricted to something like a container environment where we can guarantee that port 9867 isn't being used by another instance of zed. We'll have to hold off for now, but I'll add this to my mental list of more difficult things we should test for in some future test setup that will include a long running test of compaction.
1f02764
to
eb32514
Compare
eb32514
to
04fa70d
Compare
If no lake location is specified, zed will use a per-os default
location. Also if the default location is used, zed will first check if
there's a service on 9867 and opt to connect to that instead of
operating locally.